<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Media Setting</title>
<meta content="no-cache" http-equiv="Pragma"> 
<meta http-equiv="X-UA-Compatible" content="IE=7"><meta http-equiv="Cache-Control"   content="no-cache">   <meta http-equiv="Expires" content="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<link rel="stylesheet" type="text/css" href="../web/pagestyle.css" />
<style type="text/css">
body{margin-top:5px;}
.nav
{
    height:50px;
    border:solid #87ceeb 1px;
    border-right:0;
    width:100px;
    background-color:#ccccff;
    cursor:pointer;
    text-align:center;
    vertical-align:middle;
}
.tag
{
    background-color:#eee;
    border:solid #87ceeb 1px;
    border-left:0;
    display:none;
}
</style> 
<script>
    document.write("<script src='/cgi-bin/media.cgi?n=" + Math.random() + "'></" + "script>");
</script>
<script src="../web/jquery-1.3.2.min.js"></script>
<script src="../web/AddChn_en.js"></script>
<script>
function on_load(){
    addToBoxByMedia(); 
    addToMenu();   
    var form=document.form1;
    if(chnNum>1){
        for(var i=0;i<chnNum;i++){ 
            form.codec[i].value=media[i][0];
            form.size[i].value=media[i][1];
            form.frames[i].value=media[i][2];
            form.qos[i].value=media[i][3];
            form.rate[i].value=media[i][4]/1000;
            form.vbr[i].value= media[i][5];
            form.iframe[i].value=media[i][6];  
            form.codec1[i].value=media[i][7];
            form.size1[i].value=media[i][8];
            form.frames1[i].value=media[i][9];
            form.qos1[i].value=media[i][10];
            form.rate1[i].value=media[i][11]/1000;
            form.vbr1[i].value= media[i][12];
            form.iframe1[i].value=media[i][13];                         
            form.norm[i].value=media[i][14];
            form.mode[i].value=media[i][15];
            form.audio[i].value=media[i][16];          
            form.audChn[i].value=media[i][17];          
            form.timeEn[i].value=media[i][18];
            //form.timeX[i].value=media[i][19];
            //form.timeY[i].value=media[i][20];
            if(media[i][21]==1)form.weekEn[i].checked="checked";
            form.textEn[i].value=media[i][22];
            //form.textX[i].value=media[i][23];
            //form.textY[i].value=media[i][24];
            form.text[i].value=media[i][25];		
      }
  }else{
        form.codec.value=media[0][0];
        form.size.value=media[0][1];
        form.frames.value=media[0][2];
        form.qos.value=media[0][3];
        form.rate.value=media[0][4]/1000;
        form.vbr.value= media[0][5];
        form.iframe.value=media[0][6];  
        form.codec1.value=media[0][7];
        form.size1.value=media[0][8];
        form.frames1.value=media[0][9];
        form.qos1.value=media[0][10];
        form.rate1.value=media[0][11]/1000;
        form.vbr1.value= media[0][12];
        form.iframe1.value=media[0][13];
        form.norm.value=media[0][14];
        form.mode.value=media[0][15];
        form.audio.value=media[0][16];           
        form.audChn.value=media[0][17];      
        form.timeEn.value=media[0][18];
      //  form.timeX.value=media[0][19];
        //form.timeY.value=media[0][20];
        if(media[0][21]==1)form.weekEn.checked="checked";
        form.textEn.value=media[0][22];
        //form.textX.value=media[0][23];
        //form.textY.value=media[0][24];
        form.text.value=media[0][25];
  }  
}
function Set()
{
     var form=document.form1;
	 if(chnNum>1){
		 for(var i=0;i<chnNum;i++){ 
			 form.rate[i].value=form.rate[i].value*1000;
			 form.rate1[i].value=form.rate1[i].value*1000;
		 }
	 }else{
		form.rate.value=form.rate.value*1000;
		form.rate1.value=form.rate1.value*1000;
	 }
     form.submit();
     window.close();
}
</script>
<base target="_self"/>
</head>
<body onload="on_load()"> 
<form name="form1"  method="post" action='Media'>
<div class="tab" style="width:100%;">
<div class="tab_menu" style="text-align:center;">
<ul id="menu">
</ul>
</div>
<div class="tab_block"></div>
<div class="tab_box" id="box" style="height:365px">
</div>
</div>
<div class="tab_block"></div>
<br />
<div align="center"><table width="74" border="0" cellspacing="0" cellpadding="0"><tr><td height="18" class="TOPBG" onmouseover="this.className='TOPBGOVER';" onmouseout="this.className='TOPBG';" onclick="Set()">OK</td></tr></table></div>
</form>
</body>
</html>
